package com.sgb.zhaocai.entity;


import android.text.TextUtils;

import com.swgk.core.util.DateUtils;

import java.io.Serializable;
import java.math.BigDecimal;

public class OfferDetailsEntitly implements Serializable {

    private String addrDetail;//	项目详细地址名称
    private double addrDetailLat;//项目详细地址-维度
    private double addrDetailLng;//项目详细地址-经度
    private int announce;//经营帮是否公示（1：是；0：否）
    private String applyCompany;//发布企业编号
    private String applyCompanyName;//发布企业
    private int auditStatus;//流程审批状态（2、发布通过；4、草稿暂存；5、临时数据（经营帮））
    private String belongProjectStr;//所属工程
    private String businessPlanId;//需求详情ID
    private String distance;//距离
    private String endDate;//要求完工时间
    private String engineerContent;//施工内容
    private String id;//清单ID
    private int isShow;//是否在经营帮展示（1：是）
    private String itemBusinessControlAmount;//	经营控制量/工程量
    private String itemMemo;//	分包计划项目特征描述
    private String itemProject;//		分项工程名称
    private String itemUnit;//		计量单位
    private String itemizedUseAmount;//		工程量
    private String memo;//		劳务用工项目特征描述
    private String name;//		清单名称
    private NoticeOfferBean noticeOffer;//报价人信息
    private boolean offer;//
    private String partitionedProjectName;//分部工程名称
    private String planUseTime;//计划使用时间/开工时间
    private String projectId;//项目ID
    private String projectName;//项目名称
    private String source;//数据来源：0、企管帮；1、经营帮
    private String spec;//规格型号
    private String startDate;//要求开工时间
    private double surplus;//剩余采购量
    private String type;//清单类型：3、材料采购；1、机械租赁；5、设备租赁；2、劳务用工；4、分包计划
    private String unit;//计量单位
    private String compNo;//主企业no

    public String getCompNo() {
        return compNo;
    }

    public void setCompNo(String compNo) {
        this.compNo = compNo;
    }

    public String getDistance() {
        if (!TextUtils.isEmpty(distance)){
            BigDecimal big = new BigDecimal(distance);
            big = big.stripTrailingZeros();
            return big.toPlainString();
        }else {
            return "";
        }
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getAddrDetail() {
        return addrDetail;
    }

    public void setAddrDetail(String addrDetail) {
        this.addrDetail = addrDetail;
    }

    public double getAddrDetailLat() {
        return addrDetailLat;
    }

    public void setAddrDetailLat(double addrDetailLat) {
        this.addrDetailLat = addrDetailLat;
    }

    public double getAddrDetailLng() {
        return addrDetailLng;
    }

    public void setAddrDetailLng(double addrDetailLng) {
        this.addrDetailLng = addrDetailLng;
    }

    public int getAnnounce() {
        return announce;
    }

    public void setAnnounce(int announce) {
        this.announce = announce;
    }

    public String getApplyCompany() {
        return applyCompany;
    }

    public void setApplyCompany(String applyCompany) {
        this.applyCompany = applyCompany;
    }

    public String getApplyCompanyName() {
        return applyCompanyName;
    }

    public void setApplyCompanyName(String applyCompanyName) {
        this.applyCompanyName = applyCompanyName;
    }

    public int getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(int auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getBelongProjectStr() {
        return belongProjectStr;
    }

    public void setBelongProjectStr(String belongProjectStr) {
        this.belongProjectStr = belongProjectStr;
    }

    public String getBusinessPlanId() {
        return businessPlanId;
    }

    public void setBusinessPlanId(String businessPlanId) {
        this.businessPlanId = businessPlanId;
    }

    public String getEndDate() {
        if (!TextUtils.isEmpty(endDate)){
            String endDates = DateUtils.timestampToDate(Long.parseLong(endDate));
            return endDates;
        }else {
            return "";
        }
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getEngineerContent() {
        return engineerContent;
    }

    public void setEngineerContent(String engineerContent) {
        this.engineerContent = engineerContent;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getIsShow() {
        return isShow;
    }

    public void setIsShow(int isShow) {
        this.isShow = isShow;
    }

    public String getItemBusinessControlAmount() {
        return itemBusinessControlAmount;
    }

    public void setItemBusinessControlAmount(String itemBusinessControlAmount) {
        this.itemBusinessControlAmount = itemBusinessControlAmount;
    }

    public String getItemMemo() {
        return itemMemo;
    }

    public void setItemMemo(String itemMemo) {
        this.itemMemo = itemMemo;
    }

    public String getItemProject() {
        return itemProject;
    }

    public void setItemProject(String itemProject) {
        this.itemProject = itemProject;
    }

    public String getItemUnit() {
        return itemUnit;
    }

    public void setItemUnit(String itemUnit) {
        this.itemUnit = itemUnit;
    }

    public String getItemizedUseAmount() {
        return itemizedUseAmount;
    }

    public void setItemizedUseAmount(String itemizedUseAmount) {
        this.itemizedUseAmount = itemizedUseAmount;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public NoticeOfferBean getNoticeOffer() {
        return noticeOffer;
    }

    public void setNoticeOffer(NoticeOfferBean noticeOffer) {
        this.noticeOffer = noticeOffer;
    }

    public boolean isOffer() {
        return offer;
    }

    public void setOffer(boolean offer) {
        this.offer = offer;
    }

    public String getPartitionedProjectName() {
        return partitionedProjectName;
    }

    public void setPartitionedProjectName(String partitionedProjectName) {
        this.partitionedProjectName = partitionedProjectName;
    }

    public String getPlanUseTime() {
      /*  if (!TextUtils.isEmpty(planUseTime)){
            String timestamp = DateUtils.timestampToDate(Long.parseLong(planUseTime));
            return timestamp;
        }else {
            return "";
        }*/
        return planUseTime;
    }

    public void setPlanUseTime(String planUseTime) {
        this.planUseTime = planUseTime;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSpec() {
        if (!TextUtils.isEmpty(spec)){
            return spec;
        }else {
            return "/";
        }
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getStartDate() {
        /*if (!TextUtils.isEmpty(startDate)){
            String startDates = DateUtils.timestampToDate(Long.parseLong(startDate));
            return startDates;
        }else {
            return "";
        }*/
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public double getSurplus() {
       return surplus;
    }

    public void setSurplus(double surplus) {
        this.surplus = surplus;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Override
    public String toString() {
        return "OfferDetailsEntitly{" +
                "addrDetail='" + addrDetail + '\'' +
                ", addrDetailLat=" + addrDetailLat +
                ", addrDetailLng=" + addrDetailLng +
                ", announce=" + announce +
                ", applyCompany='" + applyCompany + '\'' +
                ", applyCompanyName='" + applyCompanyName + '\'' +
                ", auditStatus=" + auditStatus +
                ", belongProjectStr='" + belongProjectStr + '\'' +
                ", businessPlanId='" + businessPlanId + '\'' +
                ", distance='" + distance + '\'' +
                ", endDate='" + endDate + '\'' +
                ", engineerContent='" + engineerContent + '\'' +
                ", id='" + id + '\'' +
                ", isShow=" + isShow +
                ", itemBusinessControlAmount='" + itemBusinessControlAmount + '\'' +
                ", itemMemo='" + itemMemo + '\'' +
                ", itemProject='" + itemProject + '\'' +
                ", itemUnit='" + itemUnit + '\'' +
                ", itemizedUseAmount='" + itemizedUseAmount + '\'' +
                ", memo='" + memo + '\'' +
                ", name='" + name + '\'' +
                ", noticeOffer=" + noticeOffer +
                ", offer=" + offer +
                ", partitionedProjectName='" + partitionedProjectName + '\'' +
                ", planUseTime='" + planUseTime + '\'' +
                ", projectId='" + projectId + '\'' +
                ", projectName='" + projectName + '\'' +
                ", source='" + source + '\'' +
                ", spec='" + spec + '\'' +
                ", startDate='" + startDate + '\'' +
                ", surplus='" + surplus + '\'' +
                ", type='" + type + '\'' +
                ", unit='" + unit + '\'' +
                '}';
    }
}
